<?php
/**
 * Created by PhpStorm.
 * User: iamya
 * Date: 2017/10/10
 * Time: 11:39
 */

namespace app\circle\model;


class LikeModel extends BaseModel
{
    protected $name = 'circle_like'; //定义用户表
    //开启自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义自动完成的属性
    protected $auto = []; //新增修改
    protected $insert = []; //插入
    protected $update = []; //修改

    public function getMemberNameAttr($value, $data)
    {
        $model=new MemberModel();
        return $model->where('member_id',$data['member_id'])->value('member_truename');
    }
}